import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
    // {
    //     path: '/',
    //     name: 'home',
    //     component: () => import('../views/anyone/index.vue'),
    //     children:[
    //         {
    //             path: '',
    //             name: 'BlogTab',
    //             component: () => import('../components/index/BlogTab')
    //         },
    //         {
    //             path: '2',
    //             name: 'main',
    //             component: () => import('../components/index/BlogArchive')
    //         },
    //     ]
    // },
    {
        path: '/tologin',
        name: 'login',
        component: () => import('../views/admin/Login.vue')
    },
    {
        path: '/show',
        name: 'showblog',
        component: ()=> import("../views/anyone/Blog")
    },
    {
        path: '/',
        name: 'admim',
        component: ()=> import("../views/admin/index")
    }

]

const router = new VueRouter({
    mode: 'history',
    base: process.env.BASE_URL,
    routes
})

export default router
